<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>vue动画，引用animate.css</title>
    <script src="node_modules/vue/dist/vue.js"></script>
    <link rel="stylesheet" href="node_modules/animate.css/animate.css">
</head>
<body>
    <div id="app">
        <button @click="show=!show">切换</button>
        <transition name="bounce" enter-active-class="zoomInLeft" leave-active-class="zoomOutRight">
            <div class="animated" v-bind:style="styleObj" v-if="show"></div>
        </transition>
    </div>
    <script>
      new Vue({
          el: "#app",
          data: {
              styleObj: {width:"100px", height:"100px", backgroundColor:"red",margin: "0 auto"},
              show:true
          }
      });
    </script>
</body>
</html>